package vip.finance.makemoney.apiSpider.eastmoney;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import vip.finance.makemoney.config.feign.FeignJsonConfiguration;

/**
 * @author 杨滨
 * @date 2023年02月28日
 */
@FeignClient(name = "eastMoneyPushApi", url = "${feign.rpc.eastmoney_push2_api_url}", configuration = FeignJsonConfiguration.class)
public interface EastMoneyPushApi {
    //实时行情
    @GetMapping(value = "/api/qt/ulist.np/get")
    EastQtUListRep ulist(@RequestParam("fields") String fields, @RequestParam("fltt") Integer fltt, @RequestParam("secids") String secids);

    /**
     * 分时图
     * httpS://push2.eastmoney.com/api/qt/stock/trends2/get?fields1=f1%2Cf2%2Cf3%2Cf4%2Cf5%2Cf6%2Cf7%2Cf8%2Cf9%2Cf10%2Cf11%2Cf12%2Cf13&fields2=f51%2Cf52%2Cf53%2Cf54%2Cf55%2Cf56%2Cf57%2Cf58&secid=106.BABA
     * @return
     */
    @GetMapping(value = "/api/qt/stock/trends2/get")
    EastTrends2Rsp trends2(@RequestParam("fields1") String fields1, @RequestParam("fields2") String fields2, @RequestParam("secid") String secid);
}
